/*
 * Copyright (c) 2010 - 2011, Brookhaven National Laboratory
 * All rights reserved.
 * The software in this package is published under the terms
 * of the BSD license a copy of which has been included with
 * this distribution in the license.txt file.
 */


package org.oxtypes;

import org.omg.dds.core.Bootstrap;

import org.omg.dds.type.TypeKind;
import org.omg.dds.type.dynamic.DynamicType;
import org.omg.dds.type.dynamic.TypeDescriptor;

import org.oxtypes.impl.DynamicTypeManagerImpl;

public class DynamicTypeFactory
        extends org.omg.dds.type.dynamic.DynamicTypeFactory {

    public Bootstrap getBootstrap(){
        throw new java.lang.UnsupportedOperationException();
    }

    static public DynamicTypeFactory getInstance(){
        if(singleton == null){
            singleton = new DynamicTypeFactory();
        }
        return singleton;
    }

    public DynamicType getPrimitiveType(TypeKind kind){
        return registry.getPrimitiveType(kind);
    }

    public DynamicType createType(TypeDescriptor descriptor){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType createStringType(int bound){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType createWStringType(int bound){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType createSequenceType(DynamicType elementType, int bound){
        return registry.createSequenceType(elementType, bound);
    }

    public DynamicType createArrayType(DynamicType elementType, int... bound){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType createMapType(
            DynamicType keyElementType, DynamicType elementType, int bound){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType createBitSetType(int bound){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType loadTypeFromUrl(
            String documentUrl, String typeName, String... includePaths){
        throw new java.lang.UnsupportedOperationException();
    }

    public DynamicType loadTypeFromDocument(
            String document, String typeName, String... includePaths){
        throw new java.lang.UnsupportedOperationException();
    }

    private DynamicTypeFactory(){
        registry = DynamicTypeManagerImpl.getInstance();
    }

   //

   private static DynamicTypeFactory singleton;

   private DynamicTypeManagerImpl registry;

}
